package day11;

/**
 * @author oldliu
 * @since 1.0
 */
public class Thread0 {
    private final String name;

    public Thread0(String name){
        this.name=name;
    }
    public void start(){
        run();
    }
    public void run(){
        for (int i = 0; i <20 ; i++) {
            System.out.println(this.name+" print "+i);
        }
    }

    public static void main(String[] args) {
        Thread0 th=new Thread0("线程1");
        Thread0 th2=new Thread0("线程2");
        Thread0 th3=new Thread0("线程3");
        th.start();//
        th2.start();//
        th3.start();//
    }
}
